package com.xbongbong.pro.homePageManage.pojo.dto;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.OptionalRangeEntity;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @ClassName SmartSettingsSaveDTO
 * @Description 保存设置
 * @Author mengna.Deng
 * @Date 2021/11/1 16:00
 * @Version 1.0
 */
@Getter
@Setter
@ToString
public class HomePageManageSaveDTO extends BaseDTO {
    /**
     * 首页管理id
     */
    private Long id;
    /**
     * 首页管理名称
     */
    @NotBlank(message = "{dto.msg.homePageManageSave.name.NotBlank}")
    @Length(max = 20, message = "{dto.msg.homePageManageSave.name.Length}")
    private String name;
    /**
     * 启用标识，默认0未启用，1启用
     */
    private Integer enable;
    /**
     * 适用范围
     */
    private List<OptionalRangeEntity> range;
    /**
     * 执行详情
     */
    @NotBlank(message = "{dto.msg.homePageManageSave.description.NotBlank}")
    @Length(max = 20, message = "{dto.msg.homePageManageSave.description.Length}")
    private String description;
    /**
     * 引用tb_pro_index_set表的id
     */
    private JSONObject refIds;

    public HomePageManageSaveDTO(){
        enable = 0;
    }
}
